program test;

uses crt, sysutils;

var
  i, n: longint;
  w: integer;
  s: string;
  p: pointer;
  a: array of string;
  ai: array[0..10] of integer;

begin
  n := paramcount;
  writeln('Got ', n, ' arguments:');
  if n < 10 then w := 1
  else if n < 100 then w := 2
  else w := 3;

  for i := 0 to n do
  begin
    s := paramstr(i);
    writeln(i:w, '=', s, '(', length(s), ' chars)');
    //writeln(strpas(@s[2])); // index starts with 1
  end;
  writeln;
  //fillbyte(ai, sizeof(ai), $12);
  writeln('sizeof(ai)=', sizeof(ai), ' ai[0]=', hexstr(ai[0], 8));

  writeln('sizeof(byte)=    ', sizeof(byte));
  writeln('sizeof(shortint)=', sizeof(shortint));
  writeln('sizeof(smallint)=', sizeof(smallint));
  writeln('sizeof(integer)= ', sizeof(integer));
  writeln('sizeof(longint)= ', sizeof(longint));
  writeln('sizeof(cardinal)=', sizeof(cardinal));
  writeln('sizeof(int64)=   ', sizeof(int64));
  writeln('sizeof(word)=    ', sizeof(word));
  writeln('sizeof(dword)=   ', sizeof(dword));
  writeln('sizeof(longword)=', sizeof(longword));
  writeln('sizeof(qword)=   ', sizeof(qword));

  p := getmem(111);
  freemem(p);
  writeln(format('%.1f', [1.27]));
  s := 'ab \tcde   '#$09'f';
  writeln(s);
  a := s.Split(' '#9, TStringSplitOptions.ExcludeEmpty);
  for i := 0 to high(a) do writeln(a[i]);

  writeln(format('%m', [strtocurr('123.')]));

  readkey;
end.

{* E.O.F *}
